{include file='_header'}
<div class="page-header">
	当前位置：<span class="text-primary">幸运购活动管理 </span>
</div>
<div class="page-content">
<form action="" method="get" class="form-horizontal" role="form">
	<div class="page-toolbar  m-b-sm m-t-sm">
		<div class="col-sm-6">
			<span class="">
				<a class='btn btn-primary btn-sm' href="{:url('merch/luckbuy/add')}"><i class="fa fa-plus"></i> 添加活动</a>
			</span>
		</div>	
		<div class="col-sm-6 pull-right">
			<div class="input-group">				 
				<input type="text" class=" form-control" name='keyword' value="{$_GPC['keyword']}" placeholder="请输入关键词"> <span class="input-group-btn">
					<button class="btn btn-primary" type="submit"> 搜索</button> </span>
			</div>
		</div>
	</div>
</form>

{if count($list)>0}
<form action="" method="post" >
	<div class="page-table-header">
		<input type="checkbox">
		<div class="btn-group">
			<button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{:url('merch/luckbuy/index/delete')}">
				<i class='icow icow-shanchu1'></i> 删除</button>
		</div>
	</div>
	<table class="table table-hover table-responsive">
		<thead>
			<tr>
				<th style="width:25px;"></th>
				<th >活动名称</th>
				<th >活动次数</th>
				<th >每组人数</th>
				<th>参与数</th>
				<th  style="width: 95px">操作</th>
			</tr>
		</thead>
		<tbody>
			{foreach name='list' item='row'}
			<tr>
				<td>
					<input type='checkbox'   value="{$row['lottery_id']}"/>
				</td>
				<td>{$row['lottery_title']}</td>
				<td>{$row['luckbuycount']}</td>
				<td>{$row['groupcount']}</td>
				<td>{$row['viewcount']}</td>
				<td>
					<a class='btn btn-default btn-sm btn-op btn-operation' href="{:url('merch/luckbuy/log', array('id' => $row['lottery_id']))}">
						<span data-toggle="tooltip" data-placement="top" title="" data-original-title="参与记录">
							 <i class="icow icow-dingdan2"></i>
						 </span>
					</a>
					<a class='btn btn-default btn-sm  btn-op btn-operation' href="{:url('merch/luckbuy/edit', array( 'id' => $row['lottery_id']))}">
						<span data-toggle="tooltip" data-placement="top" title="" data-original-title=" 编辑">
                         	<i class="icow icow-bianji2"></i>
                     </span>
					</a>
					<a class='btn btn-default btn-sm btn-op btn-operation' data-toggle="ajaxRemove"  href="{:url('merch/luckbuy/delete', array('id' => $row['lottery_id']))}"  title='删除' data-confirm="确认删除此活动吗？">
						<span data-toggle="tooltip" data-placement="top" title="" data-original-title="删除">
							 <i class="icow icow-shanchu1"></i>
						 </span>
					</a>
				</td>
			</tr>
			{/foreach}
		</tbody>
		<tfoot>
			<tr>
				<td><input type="checkbox"></td>
				<td>
					<div class="btn-group">
						<button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{:url('merch/luckbuy/delete')}">
							<i class='icow icow-shanchu1'></i> 删除</button>
					</div>
				</td>
				<td colspan="4" class="text-right">{$pager}    </td>
			</tr>
		</tfoot>
	</table>
	{else}
	<div class='panel panel-default'>
		<div class='panel-body' style='text-align: center;padding:30px;'>
			暂时没有任何活动!
		</div>
	</div>
	{/if}
</form>
</div>
{include file='_footer'}

